home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
E-Education
/
(c)ed14.d64
/
lesson 1-4a
(
.txt
)
next >
Wrap
Commodore BASIC
|
2007-02-04
|
8KB
|
208 lines
10 GOTO100
50 REM <YES>
51 S=54272:FORE=STOS+28:POKEE,0:NEXT
52 POKE54296,15:POKE54277,42:POKE54278,250
53 POKE54276,23:POKE54273,23:POKE54272,191
54 FORT=1TO150:NEXT:POKE54276,32:FORT=1TO200:NEXT
55 POKE54296,0:RETURN
60 REM <N0>
61 S=54272:FORE=STOS+28:POKEE,0:NEXT
62 POKE54296,15:POKE54277,18:POKE54278,242
63 POKE54276,33:POKE54273,4:POKE54272,48
64 FORT=1TO250:NEXT:POKE54276,32:FORT=1TO300:NEXT
65 POKE54296,0:RETURN
70 REM <BLIP>
71 S=54272:FORE=STOS+28:POKEE,0:NEXT
72 POKE54296,5:POKE54277,42:POKE54278,250
73 POKE54276,23:POKE54273,23:POKE54272,191
74 FORT=1TO30:NEXT:POKE54276,32:FORT=1TO50:NEXT
75 POKE54296,0:RETURN
80 FORT=1TO500:NEXT:RETURN
81 FORT=1TO1000:NEXT:RETURN
82 FORT=1TO2000:NEXT:RETURN
83 FORT=1TO3000:NEXT:RETURN
84 FORT=1TO4000:NEXT:RETURN
85 FORT=1TO5000:NEXT:RETURN
90 GOSUB81:GOSUB70
91 PRINT"[154] [208]RESS [211][208][193][195][197][160][194][193][210][160]TO CONTINUE
92 [161]R$:[139]R$[179][177][199](32)[167]92
93 [142]
100 [151]53280,0:[151]53281,0:[151]646,3:[151]53272,23:C[178]0:P[178]0:W[178]0:D[178]0:G[178]0
101 [153]"LOAD ATN (null)(null)(null)CHR$CLOSEVALSTR$(null)LENATN(null)RIGHT$(null)(null)ATN(null) (null)(null)(null)CHR$(null)ATN(null)
102 PRINT" [198][207][210][160][195]64 [195][207][205][208][213][212][197][210][211]
105 [153]" WAIT";
110 [153]" WAIT";
115 [153]" (null)RACTICE (null)ROBLEMS IN ATNRITHMETIC WAIT";
120 [153]" WAIT";
125 [153]" CHR$RADE 4 (null)ART 1 WAIT";
130 [153]" WAIT";
135 [153]" (null)ESSON 1 WAIT";
140 [153]" WAIT";
145 [153]" RIGHT$NTRODUCTORY PROBLEMS OPEN WAIT";
150 [153]" WAIT";
155 [153]" WAIT"
160 [153]" WHC ONON"
165 [141]90
170 [153]"LOAD ATNND AWAY WE GO......."
175 [141]81:[141]50:[141]80
200 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 1 WAIT (null)1OPEN":Z[178]0
210 [153]" MID$AMES HAD 4 CENTS. LEFT$IS MOTHER GAVE HIM 3 CENTS MORE.
220 PRINT" [200]OW MUCH DID HE HAVE THEN?[159]"
230 INPUT A$
240 IFA$<>"7"ANDA$<>"7 CENTS"THEN 270
250 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
260 P=P+1:GOTO300
270 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
275 IFZ=2THENG=G+1:GOTO295
280 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
290 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO230
295 PRINT"[145][145][150] [200]E HAD 7[150] CENTS. ":GOSUB82
297 PRINT" 4 + 3 = 7":GOSUB82:GOSUB90
300 PRINT"[152][147][197][196]-14 [209]UESTION 2 [146] [204]1[159]":Z=0
310 PRINT" [193]T 4 CENTS EACH, HOW MUCH MUST [202]OHN PAY FOR 3 APPLES?"
320 GOSUB81:GOSUB70
330 INPUT A$
340 IFA$<>"12"ANDA$<>"12 CENTS"THEN 370
350 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
360 P=P+1:GOTO400
370 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
375 IFZ=2 THEN G=G+1:GOTO395
380 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
390 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO330
395 PRINT"[145][145][150] [202]OHN PAYS 12[150] CENTS. ":GOSUB82
397 PRINT" 4 X 3 = 12":GOSUB82:GOSUB90
400 PRINT"[152][147][197][196]-14 [209]UESTION 3 [146] [204]1[159]":Z=0
410 PRINT" [200]ARRY HAD 12 MARBLES. [200]E GAVE 4 OF THEM TO HIS BROTHER."
415 PRINT" [200]OW MANY MARBLES HAD HE LEFT?[159]"
420 GOSUB81:GOSUB70
430 INPUT A$
440 IFA$<>"8"ANDA$<>"8 MARBLES"THEN 470
450 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
460 P=P+1:GOTO500
470 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
475 IFZ=2THENG=G+1:GOTO495
480 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
490 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO430
495 PRINT"[145][145][150] [200]E HAD 8[150] MARBLES. ":GOSUB82
497 PRINT" 12 - 4 = 8":GOSUB82:GOSUB90
500 PRINT"[152][147][197][196]-14 [209]UESTION 4 [146] [204]1[159]":Z=0
510 PRINT" [193]T 5 CENTS EACH, HOW MANY PENCILS
515 [153]" CAN RIGHT$ BUY WITH 15 CENTS?"
520 [141]81:[141]70
530 [133] A$
540 [139]A$[179][177]"3"[175]A$[179][177]"3 PENCILS"[167] 570
550 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
560 P[178]P[170]1:[137]600
570 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
575 [139]Z[178]2[167]G[178]G[170]1:[137]595
580 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
590 [153]"OPENONON ONONONONONONON":[137]530
595 [153]"ONONDEF RIGHT$ CAN BUY 3DEF PENCILS. ":[141]82
597 [153]" 15 / 5 = 3":[141]82:[141]90
600 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 5 WAIT (null)1OPEN":Z[178]0
610 [153]" ASCRANK HAS 14 MARBLES AND (null)OM HAS 12 MARBLES.
615 PRINT" [200]OW MANY HAVE THEY TOGETHER?[159]"
620 GOSUB81:GOSUB70
630 INPUT A$
640 IFA$<>"26"ANDA$<>"26 MARBLES" THEN 670
650 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
660 P=P+1:GOTO700
670 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
675 IFZ=2THENG=G+1:GOTO695
680 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
690 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO630
695 PRINT"[145][145][150] [212]HEY HAVE 26[150] MARBLES. ":GOSUB82
697 PRINT" 14 + 12 = 26":GOSUB82:GOSUB90
700 PRINT"[152][147][197][196]-14 [209]UESTION 6 [146] [204]1[159]":Z=0
710 PRINT" [201]F ORANGES COST 5 CENTS EACH, HOW
715 [153]" MUCH MONEY MUST CHR$RACE HAVE TO BUY 6 ORANGES?"
720 [141]81:[141]70
730 [133] A$
740 [139]A$[179][177]"30"[175]A$[179][177]"30 CENTS" [167] 770
750 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
760 P[178]P[170]1:[137]800
770 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
775 [139]Z[178]2[167] G[178]G[170]1:[137]795
780 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
790 [153]"OPENONON ONONONONONONON":[137]730
795 [153]"ONONDEF CHR$RACE MUST HAVE 30DEF CENTS. ":[141]82
797 [153]" 5 X 6 = 30 ":[141]82:[141]90
800 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 7 WAIT (null)1OPEN":Z[178]0
810 [153]" (null)OBERT SPENT 8 CENTS FOR A TOP AND 15 CENTS FOR A KITE."
815 [153]" LEFT$OW MUCH DID BOTH COST?"
820 [141]81:[141]70
830 [133] A$
840 [139]A$[179][177]"23"[175]A$[179][177]"23 CENTS" [167] 870
850 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
860 P[178]P[170]1:[137]900
870 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
875 [139]Z[178]2[167] G[178]G[170]1:[137]895
880 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
890 [153]"OPENONON ONONONONONONON":[137]830
895 [153]"ONONDEF PEEKOTH COST 23DEF CENTS. ":[141]82
897 [153]" 8 + 15 = 23":[141]82:[141]90
900 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 8 WAIT (null)1OPEN":Z[178]0
905 [153]" (null)ARGARET BOUGHT A BOX OF CANDY WITH
910 PRINT" 12 PIECES IN IT. [211]HE GAVE 5 PIECES TO HER LITTLE SISTER
915 [153]" LEFT$OW MANY CANDIES DID SHE HAVE LEFT?"
920 [141]81:[141]70
930 [133] A$
940 [139]A$[179][177]"7"[175]A$[179][177]"7 PIECES" [167] 970
950 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
960 P[178]P[170]1:[137]1000
970 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
975 [139]Z[178]2[167] G[178]G[170]1:[137]995
980 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
990 [153]"OPENONON ONONONONONONON":[137]930
995 [153]"ONONDEF (null)HE HAD 7DEF CANDIES LEFT. ":[141]82
997 [153]" 12 - 5 = 7 ":[141]82:[141]90
1000 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 9 WAIT (null)1OPEN":Z[178]0
1005 [153]" LEFT$OW MUCH WILL MID$ERRY HAVE TO PAY
1010 PRINT" FOR 4 ICE CREAM DIPS AT 5 CENTS
1015 [153]" EACH?"
1020 [141]81:[141]70
1030 [133] A$
1040 [139]A$[179][177]"20"[175]A$[179][177]"20 CENTS" [167] 1070
1050 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
1060 P[178]P[170]1:[137]1100
1070 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
1075 [139]Z[178]2[167] G[178]G[170]1:[137]1095
1080 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
1090 [153]"OPENONON ONONONONONONON":[137]1030
1095 [153]"ONONDEF MID$ERRY WILL PAY 20DEF CENTS. ":[141]82
1097 [153]" 4 X 5 = 20 ":[141]82:[141]90
1100 [153]"PRINT#LOADVALSTR$-14 (null)UESTION 10 WAIT (null)1OPEN":Z[178]0
1105 [153]" ASCRED WON 3 RED BALLOONS, 7 WHITE
1110 PRINT" BALLOONS AND 5 BALLS."
1115 PRINT" [200]OW MANY BALLOONS DID HE WIN?"
1120 GOSUB81:GOSUB70
1130 INPUT A$
1140 IFA$<>"10"ANDA$<>"10 BALLOONS" THEN 1170
1150 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
1160 GOTO1200
1170 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
1175 IFZ=2THEN G=G+1:GOTO1195
1180 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
1190 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO1130
1195 PRINT"[145][145][150] [200]E WON 10[150] BALLOONS. ":GOSUB82
1197 PRINT" 3 + 7 = 10":GOSUB82:GOSUB90
1200 PRINT"[147] [210]EPORT [195]ARD [146]"
1205 D=W-G:C=10-W
1210 PRINT"[153] 1. [209]UESTIONS ANSWERED CORRECTLY ON FIRST TRY:
1215 [153]" ";C
1220 [153]"FOR 2. (null)UESTIONS ANSWERED CORRECTLY ON SECOND TRY:
1225 PRINT" ";D
1230 PRINT"[150] 3. [209]UESTIONS MISSED ON SECOND TRY:
1235 [153]" ";G;""
1245 [141]90
1250 [153]"SYSLOAD (null)OU HAVE A CHOICE:
1255 PRINT" [208]RESS [210] [146] TO REPEAT THIS LESSON
1260 [153]" (null)RESS (null) WAIT TO RETURN TO THE MENUOPEN"
1265 [161]R$:[139]R$[179][177]"R"[175]R$[179][177]"M"[167]1265
1270 [139]R$[178]"R"[167][140]:[137]100
1280 [153]"LOAD (null)ETURNING TO THE MENU
1285 LOAD"MENU",8
1290 RUN
1295 END
1300 REM BILL CUMBERLAND 90:11:27